<!doctype html>
<html>
	<body style="font-size:20px;">
		Android SVG test page
		<div>
			window.SVGAngle:<span id="svgAngle"></span><br/>
			SVG Feature:<span id="svgFeature"></span><br/>
			Canvas available:<span id="canvas"></span><br/>
		</div>
		<div>
			<strong>The old way:</strong>			
			Render mode chosen:<span id="renderMode"></span>
		</div>
		<div>
			<strong>The new way:</strong>			
			Render mode chosen:<span id="renderMode2"></span>
		</div>
		<script type="text/javascript">
			var sa = !!window.SVGAngle,
				sf = document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"),
				ca = !!document.createElement('canvas').getContext,
				vmlAvailable = function() { return false; };

			document.getElementById("svgAngle").innerHTML = sa;
			document.getElementById("svgFeature").innerHTML = sf;
			document.getElementById("canvas").innerHTML = ca;

			var mode = "SVG", renderMode = null, renderMode2 = null;

			if (mode === "CANVAS" && ca) 
				renderMode = "CANVAS";
			else if (mode === "SVG" && (sa || sf))
				renderMode = "SVG";
			else if (vmlAvailable())
				renderMode = "VML";		

			document.getElementById("renderMode").innerHTML = renderMode;

			if (mode === "SVG") {
				if (sa || sf) renderMode2 = "SVG"
				else if (ca) renderMode2 = "CANVAS"
				else if (vmlAvailable()) renderMode2 = "VML"
			}
			else if (mode === "CANVAS" && ca) renderMode2 = "CANVAS";
			else if (vmlAvailable()) renderMode2 = "VML";

			document.getElementById("renderMode2").innerHTML = renderMode2;
			

		</script>
	</body>
</html>
